@import "dggpublic";

section {
  h1 {
    margin: 20px 0;
    font-size: 24px;
  }

  p {
    margin: 10px 0;
    line-height: 26px;
    font-size: 14px;
  }

  .site-title {
    margin: 20px 0;
    color: #64854c;
    border-color: #64854c;
  }

  .dggui-code {
    font-size: 14px;
  }

  > .dggui-table tbody td {
    border: 1px solid #e6e6e6 !important;
  }
}

/*********************** 3.0 start ***********************/

.demo-block {
  margin: 20px 0;
  border: solid 1px #ebebeb;
  border-radius: 3px;
  transition: 0.2s;
  word-break: break-all;

  &.hover {
    box-shadow: 0 0 8px 0 rgba(232, 237, 250, 0.6),
    0 2px 4px 0 rgba(232, 237, 250, 0.5);
  }

  code {
    font-family: Menlo, Monaco, Consolas, Courier, monospace;
  }

  .demo-button {
    float: right;
  }

  .source {
    padding: 24px;
  }

  .meta {
    background-color: #fafafa;
    border-top: solid 1px #eaeefb;
    overflow: hidden;
    height: 0;
    transition: height 0.2s;
  }

  .description {
    padding: 20px;
    box-sizing: border-box;
    border: solid 1px #ebebeb;
    border-radius: 3px;
    font-size: 14px;
    line-height: 22px;
    color: #666;
    word-break: break-word;
    margin: 10px;
    background-color: #fff;

    p {
      margin: 0;
      line-height: 26px;
    }

    code {
      color: #5e6d82;
      background-color: #e6effb;
      margin: 0 4px;
      display: inline-block;
      padding: 1px 5px;
      font-size: 12px;
      border-radius: 3px;
      height: 18px;
      line-height: 18px;
    }
  }

  .highlight {
    padding-bottom: 1px;

    pre {
      margin: 10px;
      padding: 10px;
      border-radius: 2px;
      font-size: 14px;
      color: #5e6d82;
      background-color: #e6effb;
    }

    code.html {
      margin: 0;
      border: none;
      max-height: none;
      border-radius: 0;

      &::before {
        content: none;
      }
    }
  }

  .demo-block-control {
    margin-top: -1px;
    height: 44px;
    box-sizing: border-box;
    background-color: #fff;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    text-align: center;
    color: #d3dce6;
    cursor: pointer;
    position: relative;
    border-top: solid 1px #eaeefb;

    &.is-fixed {
      // position: fixed;
      // bottom: 0;
      // width: 868px;
    }

    i {
      font-size: 16px;
      line-height: 44px;
      transition: 0.3s;

      &.hovering {
        transform: translateX(-40px);
      }
    }

    > span {
      position: absolute;
      transform: translateX(-30px);
      font-size: 14px;
      line-height: 44px;
      transition: 0.3s;
      display: inline-block;
    }

    &:hover {
      color: #409eff;
      background-color: #f9fafc;
    }

    & .text-slide-enter,
    & .text-slide-leave-active {
      opacity: 0;
      transform: translateX(10px);
    }

    .control-button {
      line-height: 26px;
      position: absolute;
      top: 0;
      right: 0;
      font-size: 14px;
      padding-left: 5px;
      padding-right: 25px;
    }
  }

  .demo {
    line-height: 30px;

    > p, .dggui-row {
      margin-bottom: 10px;
    }

    .row {
      overflow: hidden;
    }

    .dggui-carousel > div > div {
      position: relative;
      color: #fff;

      > span {
        position: absolute;
        display: block;
        margin: auto;
        width: 100%;
        height: 30px;
        top: 0;
        bottom: 0;
        font-size: 30px;
        text-align: center;
      }

      &.dggui-this {
        background: #999 !important;
      }
    }
  }
}

.bg-blue {
  text-align: center;
  color: #fff;
  background-color: #0073b7 !important;
}

.bg-green {
  text-align: center;
  color: #fff;
  background-color: #189458 !important;
}

.el-carousel__item {
  h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 150px;
    margin: 0;
  }

  &:nth-child(2n) {
    background-color: #99a9bf;
  }

  &:nth-child(2n+1) {
    background-color: #d3dce6;
  }
}

.site-doc-icon {
  margin-bottom: 50px;
}

.demo-icon ul.site-doc-icon li {
  list-style: none;
  float: left;
  width: 20%;
  color: #222;
  background-image: none;
  padding: 20px 0;
  margin: 0;
  text-align: center;
  box-sizing: border-box;
  border: 1px solid #ebebeb;
}

.site-doc-icon li .iconfont {
  font-size: 36px;
}

.site-doc-icon li .dggui-icon {
  display: inline-block;
  font-size: 36px;
  line-height: 50px;
}

.demo-icon li .dggui-icon {
  width: auto !important;
  height: 50px !important;
  line-height: 50px !important;
  color: #222 !important;
  background: none !important;
}

.doc-icon-name, doc-icon-code, doc-icon-fontclass {
  display: block;
  color: #999;
  font-size: 13px;
}

.layout-list-demo {
  li {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    margin-bottom: 10px;
  }
}

ul.site-doc-icon {
  overflow: hidden;
}

ul.site-doc-icon li {
  list-style: none;
  float: left;
  width: 45%;
  color: #222;
  background-image: none;
  padding: 0;
  margin: 0;
  text-align: center;
  height: 200px;
  border: 1px solid #ebebeb;
}

.site-doc-icon li .dggui-anim {
  width: 130px;
  height: 130px;
  line-height: 130px;
  margin: 0 auto 10px;
  text-align: center;
  background-color: #009688;
  cursor: pointer;
  color: #fff;
  border-radius: 50%;
}

/*********************** 3.0 end ***********************/

/*********************** 4.0 start ***********************/

.dgg-row {
  margin: 20px 0;
}

.demo-color-main {
  position: relative;
  border-radius: 4px;
  padding: 20px;
  margin: 5px 0;
  width: 400px;
  height: 160px;
  box-sizing: border-box;
  color: #fff;
  font-size: 14px;
  background: @main;

  p {
    margin: 0;
  }

  .bg-color-sub {
    position: absolute;
    overflow: hidden;
    width: 400px;
    height: 40px;
    left: 0;
    bottom: 0;
    border-radius: 0 0 4px 4px;
    background: @neutral-base;

    .bg-blue-sub-item {
      display: block;
      float: left;
      width: 10%;
      height: 100%;
      background: @main;

      &:first-child {
        border-radius: 0 0 0 4px;
      }
    }
  }
}

.demo-color-box {
  position: relative;
  border-radius: 4px;
  padding: 20px;
  margin: 5px 0;
  //width: 400px;
  height: 160px;
  box-sizing: border-box;
  color: #fff;
  font-size: 14px;
  background: @main;

  p {
    margin: 0;
    text-align: center;
  }

  .bg-color-sub {
    position: absolute;
    overflow: hidden;
    width: 100%;
    height: 40px;
    left: 0;
    bottom: 0;
    border-radius: 0 0 4px 4px;
    background: @neutral-base;

    .bg-blue-sub-item {
      display: block;
      float: left;
      width: 33.33%;
      height: 100%;
      line-height: 40px;
      text-align: center;
      background: @main;

      &:first-child {
        border-radius: 0 0 0 4px;
      }
    }
  }

  &.success {
    background: @feature-success;

    .bg-blue-sub-item {
      &.click {
        background: @feature-success-click;
      }

      &.hover {
        background: @feature-success-hover;
      }

      &.fade {
        color: #999;
        background: @feature-success-bg;
      }
    }
  }

  &.warn {
    background: @feature-warn;

    .bg-blue-sub-item {
      &.click {
        background: @feature-warn-click;
      }

      &.hover {
        background: @feature-warn-hover;
      }

      &.fade {
        color: #999;
        background: @feature-warn-bg;
      }
    }
  }

  &.danger {
    background: @feature-danger;

    .bg-blue-sub-item {
      &.click {
        background: @feature-danger-click;
      }

      &.hover {
        background: @feature-danger-hover;
      }

      &.fade {
        color: #999;
        background: @feature-danger-bg;
      }
    }
  }

  &.link {
    background: @feature-link;

    .bg-blue-sub-item {
      &.click {
        background: @feature-link-click;
      }

      &.hover {
        background: @feature-link-hover;
      }

      &.fade {
        color: #999;
        background: @feature-link-bg;
      }
    }
  }

  &.neutral {
    background: @neutral;
  }

  &.minor {
    background: @neutral-minor;
  }

  &.help {
    background: @neutral-help;
  }

  &.placeholder {
    background: @neutral-placeholder;
  }

  &.btn {
    color: @neutral;
    background: @neutral-btn;
  }

  &.border {
    color: @neutral;
    background: @neutral-border;
  }

  &.bg {
    color: @neutral;
    background: @neutral-bg;
  }

  &.base {
    color: @neutral;
    background: @neutral-base;
  }
}

.dggui-tag {
  display: inline-block;
  vertical-align: middle;
  -webkit-border-radius: 2px;
  -moz-border-radius: 2px;
  border-radius: 2px;
  line-height: 18px;
  height: 18px;
  font-size: 12px;
  background: #999;
  padding: 0 6px;
  position: relative;
  color: #fff;
}

.dggui-tag.dggui-tag-orang {
  background-color: #f99157;
}

.dggui-tag.dggui-tag-green {
  background-color: #98d374;
}

.dggui-tag.dggui-tag-purple {
  background-color: #de8cf6;
}

.dggui-tag.dggui-tag-red {
  background-color: #f67190;
}

.dggui-tag.dggui-tag-blue {
  background-color: #5cc8df;
}

.dggui-tag.dggui-tag-brBlue {
  background-color: #819cda;
}

/*********************** 4.0 end ***********************/

//badge标签demo样式
.dgg-badge .el-badge {
  margin-right: 40px;
}
.demo-block .demo {
  .el-badge {
    line-height: initial;
  }
}
